This invention relates in general to computer networks, and particularly to client/server network architectures wherein a client process has a service connection to a server process. More particularly, the invention relates to a facility for monitoring and managing one or more service connections to a server process.
A single threaded library allows for only one thread of execution to utilize the library code. In this class of libraries, a thread is created by the client code which deploys the library, and the library code is then not at liberty to create other threads of execution. This restriction is common in non-thread safe libraries, and a large portion of code libraries in use today are non-thread safe. In a multi-threaded environment, there are often other reasons why libraries may be restricted against starting a new thread of execution.
A negative aspect of single threaded libraries is the difficulty in monitoring the health of client connections to a server from such libraries. It is common for a library to open a connection with a server process. During the course of an active connection with a server, the client library code may acquire resources from the server which are vital to the server process, such as exclusive locks on files and other important resources. It is then desirable for the server to have the ability to detect the situation in which the library is holding these resources for an indefinite amount of time due, for example, to a programming failure in the client code. In the case of single threaded libraries, the library is only able to send messages to the server when it receives control from the client code. If the client code fails to transfer the thread of control to the library code for an indefinite amount of time, the library code will be unable to send messages back to the server.
Thus, the present invention is directed to providing the server process with the capability of detecting a failure at the client code and respond thereto by closing a connection to the client library and recovering the resources to which the library was locking.
Briefly summarized, the present invention comprises in one aspect a method of monitoring a service connection between a client process and a server process. The method includes: monitoring activity of a client code of a client process by a client library of the client process, wherein the client process is a single threaded process; and monitoring activity of the client library across a service connection to a server process, wherein the activity of the client library on the service connection is indicative of activity at the client code.
Systems and program storage devices corresponding to the above-summarized method are also described and claimed herein.
To restate, provided herein is a non-intrusive facility for monitoring and managing service connections between single threaded client libraries and a server process. This non-intrusive facility allows server applications to monitor clients with a minimal amount of network traffic being generated, and can be configured to meaningful values according to a client ping interval (CPI) and a base time-out (BTO) value, which can be obtained as a function of processor speed and system performance.
Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered part of the claimed invention.